home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 2.toast / pc / sample code / printing / std file saver / source / daentry.a next >
Encoding:
Text File  |  2000-09-28  |  2.7 KB  |  78 lines

  1. ;
  2. ; Copyright 1991-1996 Apple Computer. All rights reserved.
  3. ;
  4. ;    You may incorporate this sample code into your applications without
  5. ;    restriction, though the sample code has been provided "AS IS" and the
  6. ;    responsibility for its operation is 100% yours.  However, what you are
  7. ;    not permitted to do is to redistribute the source as "DSC Sample Code"
  8. ;    after having made changes. If you're going to re-distribute the source,
  9. ;    we require that you make it clear in the source that the code was
  10. ;    descended from Apple Sample Code, but that you've made changes.
  11. ;
  12.  
  13. ***************************************************************************
  14. ****    
  15. ****    DESK ACCESSORY and DEVICE DRIVER Entry Code/Data
  16. ****    
  17. ***************************************************************************
  18.  
  19.         STRING    PASCAL
  20.  
  21.         INCLUDE 'ToolEqu.a'
  22.         INCLUDE 'SysEqu.a'
  23.         
  24.         CASE OBJ
  25. **************************** DESK ACCESSORY ENTRY **************************
  26.         IMPORT %DRVRMain
  27.  
  28. DAEntry Proc Export                                    ; See Device Manager IM:2
  29. ;
  30. ; First we need to set the drvrFlags (IM II-188), choose from
  31. ;
  32. ;    dReadEnable        enable driver for read operations             (drivers only)
  33. ;    dWritEnable        enable driver for writing                     (drivers only)
  34. ;    dCtlEnable        enable driver/da for control operations        
  35. ;    dStatEnable        enable driver/da for status operations        (drivers only)
  36. ;    dNeedGoodBye    driver/da needs a "goodbye kiss"
  37. ;    dNeedTime        driver/da needs "main thread" time
  38. ;    dNeedLock        driver will be accessed at interrupt level    (drivers only)
  39. ;
  40.     DC.B        (1<<dCtlEnable) + (1<<dStatEnable)    ; periodic, control flags set
  41.     DC.B        0                                    ; Lower byte is unused
  42. ;
  43. ; Next is the the drvrDelay (IM II-188), set only if dNeedTime flag set above
  44. ;
  45.     DC.W        0                                    ; 5 sec periodic update
  46. ;
  47. ; Next is the the drvrEMask (IM I-444), which events DA can respond to...
  48. ; Must be NIL for drivers, for DA's choose from
  49. ;    mButDwnEvt        mouse button down is event 1
  50. ;    keyDwnEvt        key down is event 3
  51. ;    keyUpEvt        key up is event 4
  52. ;    autoKeyEvt        auto-repeated key is event 5
  53. ;    updatEvt        update event
  54. ;    activateEvt        activate/deactive event
  55. ;
  56.     DC.W        0                                    ; Handle activate, update events
  57. ;
  58. ; Next is the the drvrMenu (IM I-444), Menu ID of DA's menu, or NIL
  59. ;
  60.     DC.W        0                                    ; No associated menu
  61. ;
  62. ; Next are the offsets to the main routines of the driver/DA
  63. ;
  64.     DC.W        %DRVRMain - DAEntry                    ; Open routine
  65.     DC.W        %DRVRMain - DAEntry +4                ; Prime - unused for DA's
  66.     DC.W        %DRVRMain - DAEntry +8                ; Control
  67.     DC.W        %DRVRMain - DAEntry +12                ; Status - unused for DA's
  68.     DC.W        %DRVRMain - DAEntry +16             ; Close
  69.  
  70. ;
  71. ; Next are the offsets to the main routines of the driver/DA
  72. ;
  73. DAName
  74.     DC.B        '.Print'                             ; DA/DRVR Name
  75. ;    ORG            DAName+32                            ; Pad string out to 32 bytes
  76.  
  77.     END
  78.